import React from "react";
import ReactDOM from "react-dom/client";
// import App from "./1.不使用Hook/App";
// import App from "./2.计时器实现对比/App";
// import App from "./3.useState的使用/App";
// import App from'./4.useEffect的使用/App';
// import App from './5.useContext的使用/App';
import { UserContext, ThemeContext } from "./5.useContext的使用/context";

// import App from './6.useReducer的使用/App';
// import App from './7.useCallback和useMemo/App';
// import App from './8.useMemo/App';
// import App from './9.useRef使用/App';
// import App from './10.自定义hook/App';
import { Provider } from "react-redux";
import App from "./11.redux中hook/App";
import store from "./11.redux中hook/store";

const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
  <UserContext.Provider value={{ name: "jerry", age: 18 }}>
    <ThemeContext.Provider value={{ theme: "red", size: 30 }}>
      <Provider store={store}>
        <App />
      </Provider>
    </ThemeContext.Provider>
  </UserContext.Provider>
);
